home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
utility
/
stxt120.zip
/
STXT120.DOC
< prev
next >
Wrap
Text File
|
1994-03-16
|
31KB
|
640 lines
▄▀▀▀▀▄── ██── █─── █ █▀▀▀▀▀█▀▀▀ █▀▀▀ █── █▀▀█▀▀
█────── █─ █─ █─── █ █──── █─── █──── █ █── █──
─▀▀▄▄─ █─── █ █─── █ █▄▄── █─── █▄▄─── █─── █──
──── █ █▀▀▀▀█─ █ █─ █──── █─── █──── █ █── █──
▀▄▄▄▄▀ █─── █── ██── █▄▄▄─ █─── █▄▄▄ █── █─ █──
A T E X T F I L E B R O W S E R
W I T H S E L E C T A B L E S A V E R
Len A. Philpot ■■ Pineville, Louisiana
Copyright (c) 1994, All Rights Reserved
Version 1.20, March 1994
---------------------------------------------------------------------------
This program was born out of necessity - as a frequent user of computer
bulletin boards (BBSs), I often download listings of the files that are
available for downloading. Since these files are plain ASCII text files, I
could view them in any editor, viewer or word processor. However, to keep
a record of the files I wanted to download, I would have to either write
the names down manually or (if the program in use supported it), highlight
and print each individual line on my printer. Obviously, neither method
was ideal.
SaveText makes this job easy, for example -
■ View text files and tag individual lines to be saved to another
text file
■ Incrementally save lines out of order, if desired
■ Search for text within the file; case sensitivity can be toggled
on or off; you can find and tag all matching lines or the next
match only
■ Auto-Resume lets you pick up viewing a file at the position of
your last tagged line
■ Instantly jump to any line in the file
■ Variable tab expansion
■ Pop-up help
■ Load files up to 16,384 lines (up to more than 1 megabyte,
depending on contents) and navigate around them very quickly
A special utility is provided (InHalf) to split larger text files
into two smaller files.
■ 25, 43 and 50 line modes (EGA & VGA video adapters only)
For information on what's been added/changed since the last version, check
the WHATS.NEW file.
Starting SaveText
---------------------------------------------------------------------------
To start SaveText, type ST and press Enter. If you intend to view a
text file that you think may contain some "low-order" ASCII characters
such as tabs or any other characters below ASCII 32 (space), type ST
/n instead (the case is unimportant; it can be upper or lower). The
/n parameter tells SaveText to mark those lines that contain any low
ASCII characters and filter them out before displaying the line on the
screen. More information on command line parameters can be found
below.
Specifying Input And Output Filespecs
---------------------------------------------------------------------------
Input File
----------
The first thing you will see is the opening screen with an input field
for the filespec to be viewed. If you know where the file you want to
view is located, you can enter a fully-qualified filespec (including
path, if necessary) in the input field. All of the usual editing keys
work here. To change drives, just type the drive letter followed by a
colon (for example, A:) and press Enter. If you want to quit, simply
press Esc. If SaveText can't find the file or (for example) the drive
was not ready, it will give an error message. If you press F10 (or
Enter with no file specified) an input file requestor will appear from
which you can pick the file.
Use the up & down arrows, PageUp, PageDown, Home and End keys to
navigate around the requestor. As a shortcut, you can press any
letter key and the selector bar will move to the first file or
pathname starting with that letter. Pressing it again will cycle
through the remaining matches. If there isn't a match, you will hear
a beep. To the right is a display indicating your current path,
current highlighted file and it's size in bytes. When you've
highlighted the file you want, press Enter to retrieve it. Pressing
Esc while at the file requestor will take you back to the previous
screen.
Output File
-----------
After you choose your input file, you will then be prompted to provide
an output filespec. Once again, if you wish to save the output file
on a different drive or even in a different subdirectory of the same
drive, you'll need to provide the full path to it. There is no file
requestor available here. SaveText will suggest an output file name
consisting of the input basename plus an extension of "SAV". If you
wish to change this, you can; if not, just press Enter. SaveText will
let you know if you've entered an illegal filespec through an "Invalid
output filespec - please re-enter" message. This can include a non-
existent subdirectory or drive. You will also get this error message
if you try to use the same name for both the input and output files.
If the filename is valid but already exists, SaveText will give you
the option of replacing it or appending to the end of it. Press R for
replace or A for append.
Auto-Resume
-----------
If you choose Append, you will be given the opportunity to resume
viewing your input file at the point of the last tagged line (Auto-
Resume). This is very helpful if you had to stop your previous
session before you reached the end of the file. Press N if you would
rather start viewing again at the first line or any other key to
resume at the last tagged line. If you choose to re-sync, SaveText
will place the last tagged line at the top of the screen. If it can't
find the correct line (if, for example, that particular line in the
.SAV file had been altered or removed), it will return to the top of
the file in the normal manner.
IMPORTANT - If you choose to Replace an existing file, IT IS REPLACED
AT THAT VERY POINT IN TIME. Even if you later decide not to save any
lines out to that file, it has still already been replaced. In other
words, you will have effectively erased the original file, so if it's
important, make a backup copy first.
Note - If you have a printer connected to either LPT1 or LPT2, you
can specify one of these ports as the output filename and
when you save the tagged lines, they will be printed. Just
be sure to type "LPT1" or "LPT2" exactly, or you will create
an output file on disk with a very similar name! Be aware,
however that SaveText does not actually test for the
presence nor status of a printer on either port and LPT1 and
LPT2 are the only ports supported. If something isn't
right, things could get a bit interesting!
If you really want to get a printout of the lines you save,
a better way is to go ahead and save them to a file and then
print that file either by loading it into your favorite
editor/word processor or by copying the file to the printer
by typing "COPY yourfile PRN" (without quotes) and pressing
Enter.
After pressing Enter in response to the output file prompt, SaveText
will read in and index (as well as scan for low ASCII characters if
the /n parameter was specified) the input file.
Note - If SaveText encounters an ASCII 26 character, it will abort
input at that point, since ASCII 26 is the DOS end-of-file
marker. All the lines up to that point will be viewable,
however. If you specify an input file longer than 16,384
lines, SaveText will only load that many lines and then
abort with a message on the screen as to what happened. You
can press a key to remove the message or wait a few seconds
and it will go away on it's own (most message boxes in
SaveText are like that - to remove them, press a key or wait
a few seconds and they will go away by themselves).
The next thing to come up is the file viewing screen, with a status
line at the bottom. If the file you are viewing is larger in either
width or length than what will fit on the screen at one time, a
vertical and/or horizontal scroll bar will appear at right or bottom
of the screen. These provide an approximate indicator of relative
position within the file.
The View Screen
---------------------------------------------------------------------------
Most of the commands in SaveText are available through a single
keystroke. In summary, they are -
Navigation keys -
----------------------------------------------------------------------
Up arrow......... Up 1 line Down arrow........ Down 1 line
Left arrow....... Pan left Right arrow....... Pan right
Ctrl/left arrow.. Full left Ctrl/right arrow.. Full right
PageUp........... Up 1 screen PageDn............ Down 1 screen
Home............. Top of file End............... Bottom of file
Ctrl/Home........ Beginning of file Ctrl/End.......... End of file
N................ Next tag L................. Last tag
G................ Go to line
Other keys -
----------------------------------------------------------------------
T, Spacebar...... Tag/untag line C................. Clear all tags
S................ Save all tagged lines and clear tags
I................ Invert all tags
Alt/S............ Search for a text string
Alt/T............ Set tab expansion value
Alt/V............ Cycle 25/43/50 line mode (EGA/VGA only)
Alt/D............ DOS shell (type EXIT to return)
Esc.............. Load a new file or quit SaveText
Further Details On Selected Key Strokes -
---------------------------------------------------------------------------
Ctrl/Right arrow - Full right
-----------------------------
By pressing this, the display will pan to the right as far as the
longest line in the file. If you don't see a line this long on the
screen, just scroll up or down - it's there somewhere!
Ctrl/Left arrow - Full left
---------------------------
Although the left and right arrow keys will pan the display left and
right by one column at a time, it's sometimes handy to be able to
return to the far left column quickly - that's what this keypress
does.
Home-End and Ctrl/Home-Ctrl/End
-------------------------------
(to differentiate between top/bottom and beginning/end of file)
Pressing Home will move the selector bar to the top line of the file
without changing your current left/right column position and End will
move the selector bar to the bottom of the file, also without
affecting column position. However, pressing Ctrl/Home will move the
selector bar to the top line and also move back to the far left
column, while pressing Ctrl/End will move the selector bar to the last
line and as far right as the longest line in the file. This
effectively moves from "top left" to "bottom right" of the file.
Ctrl/Home and Ctrl/End are "fully" operative only when the file is
both wider and longer than one full screen display. Otherwise, they
will simply duplicate the functions of Home and End.
G - Go to line
--------------
You can jump to a specific line in the file you are viewing by
pressing G, entering the line number and then pressing Enter. If you
enter an invalid number, nothing will happen. To abort, press Esc.
I - Invert tags
---------------
Pressing I will simply toggle the tagged state of all the lines in the
input file - lines that were not tagged will be and vice-versa. This
is very handly when, for example, you want to save all *but* a few
lines of a file.
T, Space - Tag/Untag
--------------------
These keys tag a line to be saved. If not already at the end of the
file, the selector bar will also move down one line. If the line is
already tagged, pressing T or Space will clear the tag. Tagged lines
are displayed in a different color than untagged lines*. If you tag a
line that has been previously saved, it will be displayed as in a
similar, but slightly different color scheme.
*This and other references to color obviously won't apply if you have
a monochrome system or start SaveText with the black & white video
(/b) option. However, SaveText is designed to supply all the same
information in either color or monochrome - it's just easier to
identify in color since there are more choices. For further details
on the /b parameter, see "Command Line Parameters" below.
For convenience sake, the spacebar duplicates the T key function.
N and L - Find the next/last tagged line
----------------------------------------
Sometimes it's convenient to jump from one tagged line to another and
that's what these keys will do. This function has been modified a bit
to operate more intuitively from the previous version of SaveText.
Now, if the next or last tagged line is currently on the screen, the
selector bar will simply move to and highlight it without scrolling
the screen (if you are running in black & white video mode or on a
monochrome system, the line will flash). If it's not, the next tagged
line will be at the bottom of the screen or the last tagged line will
be at the top of the screen, just like it would be if you had been
browsing for it. If there are no lines tagged, nothing will happen at
all, but if you have found the first or last tagged line, an alert box
will pop up to inform you.
S - Save and clear tags
-----------------------
Pressing S saves all tagged lines to the output file. This command
also clears all the tagged lines, but these lines are then displayed
with reduced intensity to indicate they have been saved already.
However, they may be again tagged, untagged, saved, etc. You do not
need to "manually" save any tagged lines before quitting by using this
command, however. If there are unsaved tagged lines when you quit,
you will be asked if you want to save them. This command gives you
the ability to save lines out of order and serves to mark those lines
that have already been saved during the session.
Alt/S - Search for text
-----------------------
You can perform either a case sensitive or insensitive search for text
within the file. Pressing Alt/C when the text search input box is
visible will toggle this sensitivity on or off. Also available is an
option to find and tag every match or only the next match. Toggle
this option by pressing Alt/T. The default setting is a "find-next,
case-insensitive" search. That way, if the next match isn't what you
are looking for, just press T or spacebar to untag it and then Alt/S
and Enter to search again.
When a search is initiated, SaveText will find and tag either all
matches or the next match, depending on which option is active. If
you have chosen Find All, you will remain at the same location within
the file. If you have chosen Find Next only, you will be moved to the
point in the file where the next match is found and the display will
be panned to the right or left if necessary to make the matched text
visible. The actual match will be displayed flashing within the
highlighted line containing it.
This function has been improved from the last version of SaveText to
operate a bit more intuitively. Now, the next match won't
automatically appear at the top and scroll the screen when it's
already visible. The selector bar will simply move to and highlight
the line.
With either option, a message box will alert you if there are no
(more) matches.
Note - Keep in mind while "find-all" searches always start at the
beginning of the file, "find-next" searches start on the
line immediately following the last match and go forward.
For example, if you search for "BAS" and SaveText finds a
match on line 35 and then on line 42, moving the selector
bar back to line 34 will not result in the match on line 35
being found again, unless all the tags are cleared or a
"find-all" search is made. Also, it does not search for
successive matches on the same line, since that line is
already tagged.
When you load a new file, your previous search string is retained.
Alt/T - Set tab expansion
-------------------------
When SaveText encounters a tab in the input file, it will convert it
to a series of spaces before displaying it on the screen. This option
allows you to specify how many spaces are to replace each tab, so that
the file is displayed as faithfully as possible. The minimum value is
1, the maximum 8 and the default 3. Any invalid values are ignored.
Alt/V - Video mode
------------------
If you have an EGA or better video system, you can display more than
23 or 24 lines of the file at a time. Pressing Alt/V will cycle
through the options available to you with your equipment. If you
invoke a mode with more lines available on screen than there are lines
in the file, the vertical scroll bar will not be displayed. This will
occur even in the default 25 line mode at startup if the file you are
viewing contains less than 25 lines. Also, if the file you are
viewing contains less lines than a particular video mode offers, they
will be displayed starting at the top of the screen, with a blank area
below.
IMPORTANT - If you are using a laptop or notebook computer with an LCD
screen, it's possible that invoking the 43 or 50 line mode may result
in a blank area at the bottom of the screen. This is due to the way
these display systems implement the EGA/VGA extended-line modes and
does not indicate a problem.
Alt/D - DOS shell
-----------------
By pressing Alt/D, you open SaveText's DOS shell and can perform
whatever DOS functions you wish within the remaining free memory
available. You can return to SaveText by typing EXIT.
IMPORTANT - While in the DOS shell, DO NOT erase either file that is
currently in use. Doing so will certainly cause unpredictable
behavior upon your return, most likely causing the program to abort
and possibly locking up your system.
Esc - Load a new file or quit
-----------------------------
Pressing Esc will allow you to either load a new file or quit SaveText
entirely. If you press "Q", SaveText will quit, returning you to your
original drive and directory. To load another file, press "L" and the
file requestor will again appear.
If before either operation executes there are tagged lines that have
not yet been saved, you will be asked if you want to save them. Press
either "Y" or Enter to save the file, "N" to discard all lines tagged
since the last save.
F1 - Help (not shown above)
---------------------------
Pressing the F1 key will pop up a box displaying the major functions
that are available. Press any key to remove the box from the screen.
Status line display
---------------------------------------------------------------------------
README.TXT Size: 23876 Lines: 416 │Col: 12 Line: 94 Tags: 17 F1:Help
│ │ │ │ │ │ │
│ │ │ Left column │ Lines │
│ │ Lines in │ Selected │
│ │ file Current line │
│ File size under the Help reminder
Filename in bytes selector bar
|----- Active display elements -----|
At the far left of the status line, the name of the file being viewed is
displayed, without any path information. In addition, the size is
displayed to its right and then the total number of lines in the file.
To the right of a small vertical line are the active display elements.
First, the current left-most column of the display is shown, followed by
the currently highlighted line and the number of tagged lines. These
numbers are updated as position within the file changes.
To the far right is a reminder of the Help key, F1.
Other Miscellaneous Details -
---------------------------------------------------------------------------
Command line parameters
-----------------------
/N (no low ASCII)
SaveText is designed as a text, not hex file viewer; as a result,
unpredictable results may occur if you try to view files that
aren't ASCII text such as many database, word processor or
spreadsheet files; binary files such as EXE, COM & DLL types can
get particularly interesting! If you do encounter problems with
a particular file such as a distorted or broken up display, it's
likely there are low ASCII characters in it and SaveText needs to
be started with the /n parameter to correctly view the file. No
damage will occur, just press Esc and then Q to exit and restart
SaveText as ST /n.
The default setting is to not check for low ASCII characters
(other than ASCII 12 form-feeds and ASCII 9 tabs) in the interest
of increased speed while indexing and displaying the input file.
However, if you find that a majority of the files you view
contain some low ASCII characters, it may be to your benefit to
create a batch (.BAT) file that will automatically start SaveText
with the correct parameter. For example:
echo off REM use "@echo off" with DOS version 3.3
REM & later
c:\utils\st /n REM use your actual path here
st /n
cd\
This batch file can be named ST.BAT, but if it is, make sure you
don't have ST.EXE located anywhere in your PATH, because if it
is, it will be executed directly instead of the batch file.
For a mild example of the effect of low-ASCII characters in a
file, start SaveText without the /n parameter and load
LOWASCII.TXT (included in the STXT120.xxx archive). Then look at
it again after starting with the parameter.
At any rate, SaveText handles most text files easily, so this
will probably be unnecessary.
/B (black & white video)
This parameter will force monochrome video for better legibility
when used on a LCD notebook computer or a monochrome monitor
attached to a color video card.
/Q (quiet operation)
Specifying /q on the command line will suppress all the regular
beeps and other sounds SaveText normally makes.
/F:filename.ext (input filespec)
By using /F: as the last parameter on the command line, you can
specify the input file to be loaded. A full path is necessary if
the file is not in the current directory. If SaveText can't find
the specified file, the file requestor will pop up. If it does
find the file, the suggested output filename will be displayed
normally. This parameter must be the last one on the command
line or it will be ignored.
SaveText will ignore all invalid parameters.
Memory
------
SaveText will abort if it determines there is insufficient memory
in which to run. To be safe, always have at least 200K memory
free before using SaveText.
Legalities
---------------------------------------------------------------------------
SaveText is provided as is, without any type of warranty, implicit or
otherwise. The author will not be held responsible for nor subject to
*any* claims of any sort arising out of any damages resulting from the
use of (or lack of ability to use) this product. It is intended only
for the uses as described in its documentation and no other.
No files in the SaveText package shall be modified, decompiled or
reverse engineered in any way. All archives shall be distributed with
all files fully intact and unmodified. Other than a small charge for
disk duplication and/or distribution ($10 maximum), SaveText shall be
distributed free of charge.
SaveText v1.20 (including the program file and all collateral support
files) is Copyright (c) 1994 by Len Philpot, 356 Gary K Street,
Pineville, Louisiana 71360. All Rights Reserved.
In a nutshell . . . use it at your own risk. If it turns your lawn
brown, ruins your credit rating or makes your hair fall out, don't say
I didn't warn you . . .
Revision History
---------------------------------------------------------------------------
Version 1.0 - December 1993
---------------------------
Initial release of SaveText upon a defenseless world.
Version 1.01 - December 1993
----------------------------
Bugs: While running in black & white video, the screen background
could turn white when loading a new file under certain
circumstances - Fixed.
When a printer port was specified as the output file and the
file was to be saved, an "insufficient disk space" message
would erroneously appear - Fixed.
Subdirectories with extensions were not being handled
correctly in the file requestor - Fixed.
When loading a file from a subdirectory with an extension,
the output file was being erroneously sent to the root
directory - Fixed.
Added: Next Tagged Line and Last Tagged Line functions.
Current left column and total line elements to the status
line display.
Version 1.10 - January 1994
---------------------------
Bugs: Various minor cosmetic inconsistencies - Fixed.
Shadow under "progress box" was drawn incorrectly - Fixed.
Would sometimes bomb when attempting to save a file greater
than 32,767 bytes due to a variable misdeclaration - Fixed.
Added: Auto-Resume viewing option
Progress indicator while searching
G - Go to line feature
Alt/T - Set tab expansion
Spacebar as well as T tags/untags
Various minor cosmetic enhancements
Better status reporting during file saves
Changed: Several of the filenames in the SaveText archive contained
the letters STxxx where xxx was the version number. That
pattern has now been changed to STXTxxx to avoid confusion
with other packages using the ST abbreviation.
Version 1.20 - March 1994
-------------------------
Bugs: Fixed some *very* minor cosmetic bugs dealing with colors.
Fixed a bug that would cause an extra backslash to be placed
in the output filespec path if logged onto a different drive
thanhe one ST was executing from and a path wasn't
specified.
Added: Added cosmetic "filler" to the blank area under the file
status box when retrieving a file in 43/50 line mode (fancy,
eh? :)
I - Invert tags feature
/Q (quiet) command line parameter
/F:filename command line parameter
Changed: New color scheme! This one is much easier on the eyes!
Revised the placement of the selector bar after a Goto Line,
Search, Next/Last Tag and Auto-Resume to be a bit more
naturally placed
Made Ctrl/Home and Ctrl/End duplicate Home/End when a
"narrow" file is loaded instead of simply disabling them
One Final Note
---------------------------------------------------------------------------
Writing SaveText has been great learning experience for me, since it's my
first "real" program to any degree. In view of this, I'm not going to
require any registration, cripple or add nag screens to the program for the
foreseeable future. However, a 15$ donation would be greatly appreciated
if you find it useful and continue to use it. Registration is only needed
once, since upgrades (?) will be free. A registration form is provided for
your convenience in the file REGISTER.DOC.
If you desire, I can be contacted on the RIME Q-Basic Conference or at the
PUMA Wildcat BBS, RIME Site 1026, (318) 443-1065.
Special thanks go to Jim Woodruff for all his help in writing this and many
other educational things as well. Also thanks to the participants of the
RIME Q-Basic conference for all the useful advice available there.
And a big Thanks to my wife, Annette, for putting up with me and my lack of
attention to her during the process of writing SaveText!
Thanks for trying SaveText and have fun!
Len A. Philpot
356 Gary K. Street
Pineville, LA 71360